using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.H_SkinTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HL_SkinTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HL_SkinTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HL_Skin";
			dataTableMapping.ColumnMappings.Add("SkinID", "SkinID");
			dataTableMapping.ColumnMappings.Add("SkinName", "SkinName");
			dataTableMapping.ColumnMappings.Add("IsDefault", "IsDefault");
			dataTableMapping.ColumnMappings.Add("Skin_CSS", "Skin_CSS");
			dataTableMapping.ColumnMappings.Add("IsDefaultInProject", "IsDefaultInProject");
			dataTableMapping.ColumnMappings.Add("ProjectName", "ProjectName");
			dataTableMapping.ColumnMappings.Add("ShopSkin", "ShopSkin");
			dataTableMapping.ColumnMappings.Add("SkinType", "SkinType");
			dataTableMapping.ColumnMappings.Add("SkinPath", "SkinPath");
			dataTableMapping.ColumnMappings.Add("SkinPreviewImg", "SkinPreviewImg");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HL_Skin] WHERE (([SkinID] = @Original_SkinID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_SkinID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SkinID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HL_Skin] ([SkinName], [IsDefault], [Skin_CSS], [IsDefaultInProject], [ProjectName], [ShopSkin], [SkinType], [SkinPath], [SkinPreviewImg]) VALUES (@SkinName, @IsDefault, @Skin_CSS, @IsDefaultInProject, @ProjectName, @ShopSkin, @SkinType, @SkinPath, @SkinPreviewImg)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@SkinName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "SkinName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@IsDefault", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDefault", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Skin_CSS", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "Skin_CSS", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@IsDefaultInProject", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDefaultInProject", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ProjectName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "ProjectName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ShopSkin", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "ShopSkin", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@SkinType", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "SkinType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@SkinPath", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "SkinPath", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@SkinPreviewImg", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "SkinPreviewImg", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HL_Skin] SET [SkinName] = @SkinName, [IsDefault] = @IsDefault, [Skin_CSS] = @Skin_CSS, [IsDefaultInProject] = @IsDefaultInProject, [ProjectName] = @ProjectName, [ShopSkin] = @ShopSkin, [SkinType] = @SkinType, [SkinPath] = @SkinPath, [SkinPreviewImg] = @SkinPreviewImg WHERE (([SkinID] = @Original_SkinID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@SkinName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "SkinName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@IsDefault", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDefault", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Skin_CSS", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "Skin_CSS", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@IsDefaultInProject", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDefaultInProject", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ProjectName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "ProjectName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ShopSkin", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "ShopSkin", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@SkinType", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "SkinType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@SkinPath", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "SkinPath", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@SkinPreviewImg", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "SkinPreviewImg", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_SkinID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SkinID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[13];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT SkinID, SkinName, IsDefault, Skin_CSS, IsDefaultInProject, ProjectName, \r\n      ShopSkin, SkinType, SkinPath, SkinPreviewImg\r\nFROM HL_Skin";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "DELETE [HL_Skin] WHERE SkinID=@SkinID AND IsDefault<>1";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@SkinID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "SkinID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "SELECT SkinID, SkinName, IsDefault, Skin_CSS, IsDefaultInProject, ProjectName, \r\n      ShopSkin, SkinType, SkinPath, SkinPreviewImg\r\nFROM HL_Skin\r\nWHERE (SkinType = @SkinType) AND (IsDefault = 1)";
			this._commandCollection[2].CommandType = CommandType.Text;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@SkinType", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "SkinType", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "SELECT IsDefault, IsDefaultInProject, ProjectName, ShopSkin, SkinID, SkinName, SkinPath, SkinPreviewImg, SkinType, Skin_CSS FROM HL_Skin WHERE (SkinID = @SkinID)";
			this._commandCollection[3].CommandType = CommandType.Text;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@SkinID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "SkinID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "SELECT IsDefault, IsDefaultInProject, ProjectName, ShopSkin, SkinID, SkinName, Skin_CSS FROM HL_Skin WHERE (ProjectName = @ProjectName) AND (IsDefaultInProject = 1)";
			this._commandCollection[4].CommandType = CommandType.Text;
			this._commandCollection[4].Parameters.Add(new SqlParameter("@ProjectName", SqlDbType.NVarChar, 255, ParameterDirection.Input, 0, 0, "ProjectName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5] = new SqlCommand();
			this._commandCollection[5].Connection = this.Connection;
			this._commandCollection[5].CommandText = "SELECT IsDefault, IsDefaultInProject, ProjectName, ShopSkin, SkinID, SkinName, Skin_CSS FROM HL_Skin WHERE (ProjectName = @ProjectName) AND (IsDefaultInProject = 1)";
			this._commandCollection[5].CommandType = CommandType.Text;
			this._commandCollection[5].Parameters.Add(new SqlParameter("@ProjectName", SqlDbType.NVarChar, 255, ParameterDirection.Input, 0, 0, "ProjectName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6] = new SqlCommand();
			this._commandCollection[6].Connection = this.Connection;
			this._commandCollection[6].CommandText = "SELECT Max(SkinID) FROM HL_Skin";
			this._commandCollection[6].CommandType = CommandType.Text;
			this._commandCollection[7] = new SqlCommand();
			this._commandCollection[7].Connection = this.Connection;
			this._commandCollection[7].CommandText = "SELECT IsDefault, IsDefaultInProject, ProjectName, ShopSkin, SkinID, SkinName, Skin_CSS FROM HL_Skin WHERE (ShopSkin = 1)";
			this._commandCollection[7].CommandType = CommandType.Text;
			this._commandCollection[8] = new SqlCommand();
			this._commandCollection[8].Connection = this.Connection;
			this._commandCollection[8].CommandText = "SELECT IsDefault, IsDefaultInProject, ProjectName, ShopSkin, SkinID, SkinName, Skin_CSS FROM HL_Skin WHERE (ProjectName = @ProjectName)";
			this._commandCollection[8].CommandType = CommandType.Text;
			this._commandCollection[8].Parameters.Add(new SqlParameter("@ProjectName", SqlDbType.NVarChar, 255, ParameterDirection.Input, 0, 0, "ProjectName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[9] = new SqlCommand();
			this._commandCollection[9].Connection = this.Connection;
			this._commandCollection[9].CommandText = "SELECT IsDefault, IsDefaultInProject, ProjectName, ShopSkin, SkinID, SkinName, SkinPath, SkinPreviewImg, SkinType, Skin_CSS FROM HL_Skin WHERE (SkinType = @SkinType)";
			this._commandCollection[9].CommandType = CommandType.Text;
			this._commandCollection[9].Parameters.Add(new SqlParameter("@SkinType", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "SkinType", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10] = new SqlCommand();
			this._commandCollection[10].Connection = this.Connection;
			this._commandCollection[10].CommandText = "SELECT IsDefault, IsDefaultInProject, ProjectName, ShopSkin, SkinID, SkinName, SkinPath, SkinPreviewImg, SkinType FROM HL_Skin WHERE (SkinType = @SkinType) ORDER BY IsDefault DESC";
			this._commandCollection[10].CommandType = CommandType.Text;
			this._commandCollection[10].Parameters.Add(new SqlParameter("@SkinType", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "SkinType", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11] = new SqlCommand();
			this._commandCollection[11].Connection = this.Connection;
			this._commandCollection[11].CommandText = "UPDATE [HL_Skin] SET [IsDefault] = 0 WHERE ([SkinType] = @SkinType);\r\nUPDATE [HL_Skin] SET [IsDefault] = 1 WHERE ([SkinID] = @SkinID)";
			this._commandCollection[11].CommandType = CommandType.Text;
			this._commandCollection[11].Parameters.Add(new SqlParameter("@SkinType", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "SkinType", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[11].Parameters.Add(new SqlParameter("@SkinID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "SkinID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[12] = new SqlCommand();
			this._commandCollection[12].Connection = this.Connection;
			this._commandCollection[12].CommandText = "UPDATE [HL_Skin] SET [IsDefaultInProject] =0 WHERE ProjectName=@ProjectName;\r\nUPDATE [HL_Skin] SET [IsDefaultInProject] =  1  WHERE (([SkinID] = @SkinID)) ";
			this._commandCollection[12].CommandType = CommandType.Text;
			this._commandCollection[12].Parameters.Add(new SqlParameter("@ProjectName", SqlDbType.NVarChar, 255, ParameterDirection.Input, 0, 0, "ProjectName", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[12].Parameters.Add(new SqlParameter("@SkinID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "SkinID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Skin.HL_SkinDataTable GetAllSkins()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			H_Skin.HL_SkinDataTable hL_SkinDataTable = new H_Skin.HL_SkinDataTable();
			this.Adapter.Fill(hL_SkinDataTable);
			return hL_SkinDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Skin.HL_SkinDataTable GetDefaultBySkinType(string SkinType)
		{
			this.Adapter.SelectCommand = this.CommandCollection[2];
			if (SkinType == null)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = SkinType;
			}
			H_Skin.HL_SkinDataTable hL_SkinDataTable = new H_Skin.HL_SkinDataTable();
			this.Adapter.Fill(hL_SkinDataTable);
			return hL_SkinDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Skin.HL_SkinDataTable GetBySkinBySkinID(int SkinID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			this.Adapter.SelectCommand.Parameters[0].Value = SkinID;
			H_Skin.HL_SkinDataTable hL_SkinDataTable = new H_Skin.HL_SkinDataTable();
			this.Adapter.Fill(hL_SkinDataTable);
			return hL_SkinDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Skin.HL_SkinDataTable GetDefaultProjectSkin(string ProjectName)
		{
			this.Adapter.SelectCommand = this.CommandCollection[4];
			if (ProjectName == null)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = ProjectName;
			}
			H_Skin.HL_SkinDataTable hL_SkinDataTable = new H_Skin.HL_SkinDataTable();
			this.Adapter.Fill(hL_SkinDataTable);
			return hL_SkinDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Skin.HL_SkinDataTable GetDefaultSkinByProjectName(string ProjectName)
		{
			this.Adapter.SelectCommand = this.CommandCollection[5];
			if (ProjectName == null)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = ProjectName;
			}
			H_Skin.HL_SkinDataTable hL_SkinDataTable = new H_Skin.HL_SkinDataTable();
			this.Adapter.Fill(hL_SkinDataTable);
			return hL_SkinDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Skin.HL_SkinDataTable GetShopSkin()
		{
			this.Adapter.SelectCommand = this.CommandCollection[7];
			H_Skin.HL_SkinDataTable hL_SkinDataTable = new H_Skin.HL_SkinDataTable();
			this.Adapter.Fill(hL_SkinDataTable);
			return hL_SkinDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Skin.HL_SkinDataTable GetSkinByProjectName(string ProjectName)
		{
			this.Adapter.SelectCommand = this.CommandCollection[8];
			if (ProjectName == null)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = ProjectName;
			}
			H_Skin.HL_SkinDataTable hL_SkinDataTable = new H_Skin.HL_SkinDataTable();
			this.Adapter.Fill(hL_SkinDataTable);
			return hL_SkinDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Skin.HL_SkinDataTable GetSkinBySkinType(string SkinType)
		{
			this.Adapter.SelectCommand = this.CommandCollection[9];
			if (SkinType == null)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = SkinType;
			}
			H_Skin.HL_SkinDataTable hL_SkinDataTable = new H_Skin.HL_SkinDataTable();
			this.Adapter.Fill(hL_SkinDataTable);
			return hL_SkinDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Skin.HL_SkinDataTable GetSkinNameBySkinType(string SkinType)
		{
			this.Adapter.SelectCommand = this.CommandCollection[10];
			if (SkinType == null)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = SkinType;
			}
			H_Skin.HL_SkinDataTable hL_SkinDataTable = new H_Skin.HL_SkinDataTable();
			this.Adapter.Fill(hL_SkinDataTable);
			return hL_SkinDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(H_Skin.HL_SkinDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(H_Skin dataSet)
		{
			return this.Adapter.Update(dataSet, "HL_Skin");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[DataObjectMethod(DataObjectMethodType.Delete, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int DeleteSkin(int SkinID)
		{
			SqlCommand sqlCommand = this.CommandCollection[1];
			sqlCommand.Parameters[0].Value = SkinID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int? GetMaxSkinID()
		{
			SqlCommand sqlCommand = this.CommandCollection[6];
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			object obj;
			try
			{
				obj = sqlCommand.ExecuteScalar();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			int? result;
			if (obj == null || obj.GetType() == typeof(System.DBNull))
			{
				result = null;
			}
			else
			{
				result = new int?((int)obj);
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int SetIsDefault(string SkinType, int SkinID)
		{
			SqlCommand sqlCommand = this.CommandCollection[11];
			if (SkinType == null)
			{
				sqlCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[0].Value = SkinType;
			}
			sqlCommand.Parameters[1].Value = SkinID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int SetISDefaultInProject(string ProjectName, int SkinID)
		{
			SqlCommand sqlCommand = this.CommandCollection[12];
			if (ProjectName == null)
			{
				sqlCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[0].Value = ProjectName;
			}
			sqlCommand.Parameters[1].Value = SkinID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
